package com.example.test;

import java.util.ArrayList;

import com.example.learnandroid.R;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.LinearLayout;

public class ImagePreview extends Activity{
	private ArrayList<ImageView> listImage;
	private Bitmap bm;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.image_preview);
		listImage = new ArrayList<ImageView>();
		bm = BitmapFactory.decodeResource(getResources(), R.drawable.test0);
		initImageView();
		
	}
	
	private void initImageView(){
		ImageView img1 = (ImageView) findViewById(R.id.img1);
		img1.setImageBitmap(bm);
		ImageView img2 = (ImageView) findViewById(R.id.img2);
		img2.setImageBitmap(bm);
		ImageView img3 = (ImageView) findViewById(R.id.img3);
		img3.setImageBitmap(bm);
		ImageView img4 = (ImageView) findViewById(R.id.img4);
		img4.setImageBitmap(bm);
		ImageView img5 = (ImageView) findViewById(R.id.img5);
		img5.setImageBitmap(bm);
		ImageView img6 = (ImageView) findViewById(R.id.img6);
		img6.setImageBitmap(bm);
		ImageView img7 = (ImageView) findViewById(R.id.img7);
		img7.setImageBitmap(bm);
		ImageView img8 = (ImageView) findViewById(R.id.img8);
		img8.setImageBitmap(bm);
		ImageView img9 = (ImageView) findViewById(R.id.img9);
		img9.setImageBitmap(bm);
		ImageView img10 = (ImageView) findViewById(R.id.img10);
		img10.setImageBitmap(bm);
		
		ImageView img11 = (ImageView) findViewById(R.id.img11);
		img11.setImageBitmap(bm);
		ImageView img12 = (ImageView) findViewById(R.id.img12);
		img12.setImageBitmap(bm);
		ImageView img13 = (ImageView) findViewById(R.id.img13);
		img13.setImageBitmap(bm);
		ImageView img14 = (ImageView) findViewById(R.id.img14);
		img14.setImageBitmap(bm);
		ImageView img15 = (ImageView) findViewById(R.id.img15);
		img15.setImageBitmap(bm);
		ImageView img16 = (ImageView) findViewById(R.id.img16);
		img16.setImageBitmap(bm);
		ImageView img17 = (ImageView) findViewById(R.id.img17);
		img17.setImageBitmap(bm);
		ImageView img18 = (ImageView) findViewById(R.id.img18);
		img18.setImageBitmap(bm);
		ImageView img19 = (ImageView) findViewById(R.id.img19);
		img19.setImageBitmap(bm);
		ImageView img20 = (ImageView) findViewById(R.id.img20);
		img20.setImageBitmap(bm);
		ImageView img21 = (ImageView) findViewById(R.id.img21);
		img21.setImageBitmap(bm);
		
		listImage.add(img1);
		listImage.add(img2);
		listImage.add(img3);
		listImage.add(img4);
		listImage.add(img5);
		listImage.add(img6);
		listImage.add(img7);
		listImage.add(img8);
		listImage.add(img9);
		listImage.add(img10);
		listImage.add(img11);
		listImage.add(img12);
		listImage.add(img13);
		listImage.add(img14);
		listImage.add(img15);
		listImage.add(img16);
		listImage.add(img17);
		listImage.add(img18);
		listImage.add(img19);
		listImage.add(img20);
		listImage.add(img21);
	}
}
